Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(protocol): update amounts emitted to match length with tokenIds #15898

Merged
merged 4 commits into from
Feb 19, 2024

Conversation

n1punp
Copy link
Contributor

@n1punp n1punp commented Feb 18, 2024

The TokenReceived event should emit amounts of the same length as the tokenIds, even if it is unused for ERC721.

I would also recommend enforcing amount = 1 for each ERC721 send in sendToken and updating the TokenReceived event to have amounts just be an array of 1s. The upside is that it is clear that you are transferring the whole ERC721, instead of unused amount field. The downside is gas usage.

@n1punp
Copy link
Contributor Author

n1punp commented Feb 19, 2024

@dantaik This will slightly increase the gas usage due to nonzero calldata bytes, but I think it is more correct to require amount = 1 for ERC721. What do you think?

@dantaik dantaik added this pull request to the merge queue Feb 19, 2024
Merged via the queue into taikoxyz:main with commit bfa0ca2 Feb 19, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants